# 第一步指定cmake 最小版本
cmake_minimum_required(VERSION 3.0)

project(DIFFERENTIAL)

# 指定PROJ库安装路径
# set(CMAKE_PREFIX_PATH "/cm/shared/apps/proj-9.2.0/")
# set(CMAKE_PREFIX_PATH "/root/soft/proj-9.2.0/build/")
# find_package(PROJ REQUIRED CONFIG)
set(CMAKE_PREFIX_PATH "/cm/shared/apps/seal")
find_package(SEAL REQUIRED CONFIG)

include_directories(${CMAKE_SOURCE_DIR}/common,${CMAKE_SOURCE_DIR}/maxFlow)
# include_directories(/cm/shared/apps/proj-9.2.0/include)
# include_directories(${PROJ_INCLUDE_DIR})
# include_directories(${SEAL_INCLUDE_DIR}/SEAL-4.1)
include_directories(/cm/shared/apps/seal/include/SEAL-4.1)

# 添加对gdb的支持
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g2 -ggdb")
SET(CMAKE_CXX_FLAGS_RELEASE "$ENV{CXXFLAGS} -O3 -Wall")
SET(CMAKE_CXX_FLAGS "-std=c++0x")
# SET(CMAKE_CXX_STANDARD 23)

add_executable(main;main.cpp)
# target_link_libraries(main PRIVATE PROJ::proj)
target_link_libraries(main PRIVATE SEAL::seal -lgsl -lgslcblas -lm)#连接seal、GSL库

add_executable(OPT;./maxFlow/OPT.cpp)
target_link_libraries(OPT PRIVATE SEAL::seal -lgsl -lgslcblas -lm)

add_executable(Baseline;./maxFlow/Baseline.cpp)
target_link_libraries(Baseline PRIVATE SEAL::seal -lgsl -lgslcblas -lm)

add_executable(Baseline2;./maxFlow/Baseline2.cpp)
target_link_libraries(Baseline2 PRIVATE SEAL::seal -lgsl -lgslcblas -lm)

add_executable(KS;./maxFlow/KS.cpp)
target_link_libraries(KS PRIVATE SEAL::seal -lgsl -lgslcblas -lm)

add_executable(Kmeans;./maxFlow/Kmeans.cpp)
target_link_libraries(Kmeans PRIVATE SEAL::seal -lgsl -lgslcblas -lm)

